const { http } = uni.$u
//1.	数据字典（用于反显）
/* export const getDictionaryData = (params, config = {}) => http.post('/whhmpt/sys/dictionary/data', params, config) */
export const getDictionaryData = (params,config = {}) => http.post('/whhmpt/app/common/dictionary/data',params,config)
// 2.	海绵设施撒点
export const getFacilityList = (params, config = {}) => http.get('/whhmpt/app/facility/getFacilityList', params, config)
//2.海绵设施列表
export const getFacilityListByXmmc = (params, config = {}) => http.post('/whhmpt/app/facility/list', params, config)
//4.	海绵设施详情（基础信息）及全景
export const queryFacility = (params, config = {}) => http.get('/whhmpt/project/facilities/query/' + params, {}, config)
//5.	海绵设施巡检记录
export const getRecord = (params, config = {}) => http.post('/whhmpt/app/inspection/record', params, {}, config)
// 6.	展示不同类型的监测设备统计数据
export const getTypeCount = (params, config = {}) => http.get('/whhmpt/app/site/getTypeCount', params, config)
//7.	监测设备撒点
export const getSites = (params, config = {}) => http.post('/whhmpt/app/site/getSites', params, config)

export const queryMonitordata = (params, config = {}) => http.get(`/whhmpt/app/monitordata/site${uni.$u.queryParams(params)}`, params, config)

export const getHisAggData = (params, config = {}) => http.get(`/whhmpt/app/monitordata/getHisAggData${uni.$u.queryParams(params)}`,params, config)

//5.	获取海绵设施下设备的实时数据
export const getFactiesData = (params, config = {}) => http.get(`/whhmpt/app/monitordata/query/${params.id}`,params, config)


// 1.查询数据字典
export const getDateDic = (params,config = {}) => http.post('/whhmpt/app/common/dictionary/data',params,config)
/* export const getDateDic = (params,config = {}) => http.post('/whhmpt/sys/dictionary/data',params,config) */
// 巡检 1.巡检计划列表
export const getPlan = (params,config = {}) => http.post('/whhmpt/app/inspection/plan',params,config)
// 巡检 2.计划下设备列表
export const getPlanDevice = (params,config = {}) => http.post('/whhmpt/app/inspection/planDevice',params,config)
// 巡检 3.新增巡检记录
export const addXJRecord = (params,config = {}) => http.post('/whhmpt/app/inspection/add',params,config)
// 巡检 4.巡检记录提交
export const editXJRecord = (params,config = {}) => http.post('/whhmpt/app/inspection/edit',params,config)
// 巡检 5.巡检轨迹新增
export const addtrack = (params,config = {}) => http.post('/whhmpt/app/inspection/addtrack',params,config)
// 巡检 6.巡检详情
export const getDetail = (params, config = {}) => http.get(`/whhmpt/maintenance/inspection/record/query/${params.id}`,params, config)

// 运维 1.获取分配给该用户的代办工单
export const getNotAssign = (params,config = {}) => http.post('/whhmpt/app/eventhandle/query/notassign',params,config)
// 运维 2.获取该用户的已接单
export const getAssign = (params,config = {}) => http.post('/whhmpt/app/eventhandle/query/assign',params,config)
// 运维 3.任务详情
export const getMissionDetail = (params, config = {}) => http.get(`/whhmpt/maintenance/eventhandle/query/${params.id}`,params, config)
// 运维 4.用户接单
export const handleAssgin = (params,config = {}) => http.post('/whhmpt/app/eventhandle/assgin',params,config)
// 运维 5.工单反馈
export const getFeedback = (params,config = {}) => http.post('/whhmpt/app/eventhandle/feedback',params,config)

// 获取token
export const getToken = (params,config = {}) => http.post('/whhmpt/auth/wstoken',params,config)
export const getToken2 = (params,config = {}) => http.post('/whhmpt/auth/ythptwstoken',params,config)

// 文件上传
export const uploadFile = (params,config = {}) => http.post('/whhmpt/file/upload/base64',params,config)

// 红黑榜
export const getHHBList = (params,config = {}) => http.post('/whhmpt/app/redblacklist/list',params,config)

// 调度指令
export const getDdzlList = (params, config = {}) => http.get(`/whhmpt/app/order/list?pageNum=${params.pageNum}&pageSize=${params.pageSize}`,params, config)
export const todoFeedback = (params,config = {}) => http.post('/whhmpt/app/order/feedback',params,config)
export const getDetailZL = (params, config = {}) => http.get(`/whhmpt/app/order/query/${params.id}`,params, config)

// 问题上报
export const uploadFileOfQuestion = (params,config = {}) => http.post('/whhmpt/app/common/upload/base64',params,config)
export const questionUp = (params,config = {}) => http.post('/whhmpt/app/problemreport/add',params,config)

// 项目巡查
export const getAllProject = (params,config = {}) => http.post('/whhmpt/project/baseinfo/data',params,config)
export const getAllProjectNew = (params,config = {}) => http.post('/whhmpt/project/baseinfo/dataAll',params,config)
export const getAllDepartment = (params,config = {}) => http.get('/whhmpt/sys/dept/tree',params,config)
export const getCurrentUser = (params,config = {}) => http.post('/whhmpt/auth/getCurrentUserInfo',params,config)
export const getDDIC = (params,config = {}) => http.post('/whhmpt/app/common/dictionary/data',params,config)
export const getProjectDetail = (params, config = {}) => http.get(`/whhmpt/project/baseinfo/query/${params.id}`,params, config)
export const getListIssues = (params, config = {}) => http.get(`/whhmpt/issues/listIssues`,params, config)
export const getListGuidance = (params, config = {}) => http.get(`/whhmpt/issues/listGuidance`,params, config)


export const addPro = (params,config = {}) => http.post('/whhmpt/project/rectify/add',params,config)
export const proList = (params,config = {}) => http.post('/whhmpt/project/rectify/list',params,config)
export const findPro = (params, config = {}) => http.get(`/whhmpt/project/rectify/query/${params.id}`,params, config)
export const deletePro = (params, config = {}) => http.get(`/whhmpt/project/rectify/delete/${params.id}`,params, config)
export const editPro = (params,config = {}) => http.post('/whhmpt/project/rectify/edit',params,config)
export const upProStatus = (params,config = {}) => http.post('/whhmpt/project/rectify/save',params,config)
export const exportPro = (params, config = {}) => http.get(`/whhmpt/project/rectify/export/${params.id}`,params, config)
export const getRoles = (params,config = {}) => http.post('/whhmpt/sys/role/checkRole',params,config)
export const getUser = (params,config = {}) => http.post('/whhmpt/auth/getCurrentUserInfo',params,config)
export const editNowPro = (params,config = {}) => http.post('/whhmpt/project/rectify/update',params,config)
export const backPro = (params,config = {}) => http.post('/whhmpt/project/rectify/sendback',params,config)

/* 排水户填报 */
export const getCode = (params,config = {}) => http.get('/whhmpt/auth/getCode',params,config)
export const submitPsh = (params,config = {}) => http.post('/whhmpt/drainage/collection/collect',params,config)


/* 管网复核 */
export const pipecheckQuery = (params,config = {}) => http.post('/whhmpt/app/pipecheck/paging',params,config)
export const pipecheckDetail = (params, config = {}) => http.get(`/whhmpt/app/pipecheck/query/${params.id}`,params, config)
export const pipecheckRecheck = (params,config = {}) => http.post('/whhmpt/app/pipecheck/fh',params,config)

/* 巡查消息 */
export const getXcMessage = (params, config = {}) => http.get('/whhmpt/app/inspection/getInspectionPlanMsg',params, config)
export const sendXcMessage = (params, config = {}) => http.get(`/whhmpt/app/inspection/setMsgRead/${params.ids}`,params, config)

/* 巡查日志 */
export const postXcrz = (params,config = {}) => http.post('/whhmpt/project/patrol-log/add',params,config)
export const getXmMessage = (params, config = {}) => http.get(`/whhmpt/project/baseinfo/query/${params.id}`,params, config)
export const getPatrolLog = (params, config = {}) => http.post(`/whhmpt/project/patrol-log/list`,params, config)
export const getPatrolDetail = (params, config = {}) => http.get(`/whhmpt/project/patrol-log/info/${params.id}`,params, config)

// 项目巡查计划
export const getPagingFuturePlan  = (params, config = {}) => http.post(`/whhmpt/app/patrol/plan/pagingFuture `,params, config)
export const getPagingFutureInfo  = (params, config = {}) => http.get(`/whhmpt/app/patrol/plan/info/${params.id} `,params, config)
